<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    $router->resource('auth/users', 'AdminsController');
    $router->resource('users', 'UsersController');
    $router->resource('teams', 'TeamsController');
    $router->resource('machines', 'MachinesController');
    $router->resource('products', 'ProductsController');
    $router->resource('categories', 'CategoryController');
    $router->resource('operators', 'OperatorsController');
    $router->resource('team_leaders', 'TeamLeadersController');
    $router->resource('dispatch_free_logs', 'DispatchFreeLogController');
    $router->resource('applies', 'AppliesController');
    $router->resource('sliders', 'SliderController');
    $router->resource('orders', 'OrderController');
    $router->resource('point_bags', 'PointBagController');
    $router->resource('settings', 'SettingController');

    $router->get('orders/{order}', 'OrdersController@show')->name('admin.orders.show');
    $router->get('machines/{machine}', 'MachinesController@show')->name('admin.machines.show');
    $router->get('operators/{operator}', 'OperatorsController@show')->name('admin.operators.show');
    $router->get('products/{product}', 'ProductsController@show')->name('admin.products.show');
    $router->get('categories/{category}', 'categoryController@show')->name('admin.categories.show');

    $router->get('statistics', 'StatisticsController@index');

});
